package com.founder.cebxkit;

import java.util.ArrayList;

public class CxSearchResult {
	public ArrayList<CxRect> rects;		// 匹配项所包含的外接矩形
	public int rectcount;				// 外接矩形个数
	public String text;					// 匹配的文字及上下文
	public int matchBegin;				// 匹配文字在szText中的位置
	public int matchLength;				// 匹配文字的长度

	public CxSearchResult()	{
		rects = null;
		rectcount = 0;
		text = null;
		matchBegin = 0;
		matchLength = 0;
	}
	
	public void Newrects(int count) {
		rectcount = count;
		rects = new ArrayList<CxRect>();
	}
	
	public void Setrects(float left, float top, float right, float bottom) {
		CxRect rect = new CxRect();
		rect.SetRectValue(left, top, right, bottom);
		rects.add(rect);
	}
	
	public void Newtext(char[] str) {
		text = new String(str);
	}
}
